<template>
  <button class="demo-button">
      {{msg}}
    <slot />
  </button>
</template>

<script lang="ts">
// import { Options, Vue } from 'vue-class-component';
// @Options({
//   props: {
//     msg: String
//   }
// })
// export default class DemoButton extends Vue {
//   msg!: string
// }
export default {
  name: 'demo-button',

  props: {
    color: String,
    type: {
      type: String,
      default: 'primary',
    },
  },
  setup(props) {
        console.log(props) // { user: '' }

    return {} // 这里返回的任何内容都可以用于组件的其余部分
  },
  created(){
      let isDone: boolean = false;
      console.log(isDone)
  }
};
</script>

<style lang="scss">
.demo-button {
  min-width: 120px;
  color: #fff;
  font-size: 16px;
  line-height: 36px;
  background-color: #f44;
  border: none;
  border-radius: 30px;
}
</style>
